package o;

import androidx.fragment.app.Fragment;
import java.util.HashMap;
import java.util.Map;

public class chh {
    private static Map<String, Class<? extends e>> ˏ = new HashMap();

    public interface e {
        Fragment ˎ(chx o_chx);
    }

    public static void ˊ(String str, Class<? extends e> cls) {
        ˏ.put(str, cls);
    }

    public static Fragment ˋ(chx o_chx) {
        String ˋ = o_chx.ˋ();
        if (dof.ॱ(ˋ)) {
            return null;
        }
        String substring;
        int indexOf = ˋ.indexOf(124);
        if (indexOf != -1) {
            substring = ˋ.substring(0, indexOf);
        } else {
            substring = ˋ;
        }
        Class cls = (Class) ˏ.get(substring);
        if (cls == null) {
            return null;
        }
        try {
            return ((e) cls.getConstructor(new Class[0]).newInstance(new Object[0])).ˎ(o_chx);
        } catch (Exception e) {
            Logger.ˋ("ExternalFragmentFactory", "createFragment fail:" + substring);
            return null;
        }
    }
}
